var vm = new Vue({
    el: '#app',
    data: {
      message: 'Hello',
      // fullName: 'John Doe',
      firstName: 'John',
      lastName: 'Doe'
    },
    computed: {
      fullName: {
        // getter
        get: function () {
          return this.firstName + ' ' + this.lastName
        },
        // setter
        set: function (newValue) {
          var names = newValue.split(' ')
          this.firstName = names[0]
          this.lastName = names[names.length - 1]
        }
      }
    },
    methods: {
        reversedMessageMet: function () {
          return this.message.split('').reverse().join('')
        }
      }
    // {{}} 也可接受computed中的值作为返回（computed必有返回值，一般为string）
  })